package chapter14;

/**
 * @author : DuJiabao
 * @Date : 2021/2/25 9:08
 * @Project : thinking_in_java
 * @File : null.java
 * @Desc :
 */
class Building {
}

class House extends Building {
}


public class ClassCasts {
  public static void main(String[] args) {
    Building b = new House();
    Class<House> houseType = House.class;
    House h = houseType.cast(b);
    h = (House)b;  //两者等效
  }
}
